package com.tangbao.vuedata.service;

import com.tangbao.vuedata.model.OneNews;
import org.springframework.stereotype.Component;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import java.util.List;

/**
 * 功能:
 * 作者: zhouxin
 * 日期: 2018/3/2
 */
@Component
@Path("/news")
@Produces({ "application/json" })
public interface OneNewsService {


    @GET
    @Path("/getnewslist")

    List<OneNews> getOneNewsByAll(@QueryParam("start") Integer start, @QueryParam("pageSize") Integer pageSize);


    @GET
    @Path("/getlunbolist")
    List<Object> getlunbolist(@QueryParam("start") Integer start, @QueryParam("pageSize") Integer pageSize);

    @GET
    @Path("/getnew/:id")
    OneNews getOneNewsByAll(Integer id);

    /**
     * 新增一级菜单
     * @param oneNews
     * @return
     */
    int saveOneNews(OneNews oneNews);

    /**
     * 编辑一级菜单
     * @param oneNews
     * @return
     */
    int updateOneNews(OneNews oneNews);

}
